import React from 'react';
import './style/index.less';

import {Button, notification} from 'antd';
import BaseComponent from "components/Base/BaseComponent";

export default class NotificationDemo extends BaseComponent {

  openNotificationWithIcon = (type) => {
    this.showNotice(type, {
      message: 'Notification Title',
      description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
    });
  };

  openBasic = () => {
    notification.open({
      message: 'Notification Title',
      description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
    });
  };


  render() {
    return (
      <div>
        <Button onClick={() => this.openNotificationWithIcon('success')}>Success</Button>
        <Button onClick={() => this.openNotificationWithIcon('info')}>Info</Button>
        <Button onClick={() => this.openNotificationWithIcon('warning')}>Warning</Button>
        <Button onClick={() => this.openNotificationWithIcon('error')}>Error</Button>
      </div>
    );
  }
}




